
<script type="text/javascript">
	
	function check()
	{
		re=/^\s*$/;
		if(re.test(formsua.tennguoi.value))
		{
			alert("Tiêu đề không được để trống");
			return false;
		}
	}
</script>
<!-- /TinyMCE -->

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <div id="table"> 
     <?
	$id=$_REQUEST["id"];
	$sql="select * from hotrotructuyen where idhotrotructuyen = $id";
	$result=mysql_query($sql) or die("Can not query hotrotructuyen in edit.php");
	while ($row=mysql_fetch_array($result))
	{
?>


<form name="formsua" method="post" action="?go=hotrotructuyen&action=edit&id=<?=$id?>" onsubmit="return check();" enctype="multipart/form-data"  >
		<table cellpadding="0" cellspacing="0" border="1" align="center" width="100%">
			<tr>
				<td width="20%" align="right" style="padding-right:5px"> Tên người hỗ trợ </td>
				<td width="80%" style="padding-left:5px;"> <input type="text" name="tennguoi" value="<?=$row['tennguoi']?>" style="width:70%"> </td>
			</tr>
            <tr>
            	<td width="20%" align="right" style="padding-right:5px"> Nickname </td>
				<td width="80%" style="padding-left:5px;"> <input type="text" name="nickname" value="<?=$row['nickname']?>" style="width:70%"> </td>
            </tr>
            
			<tr>
      			<td align="right" style="padding-right:5px">Trạng thái: </td>
      			<td style="padding-left:5px">
        			<select name="trangthai">
					<?
						if($row['status']==1)
						{
					?>
						<option value="1" selected="selected">Hoạt động</option>
						<option value="0">Không hoạt động</option>
					<?
						}
						else
						{
					?>
						<option value="1">Hoạt động</option>
						<option value="0" selected="selected">Không hoạt động</option>		
					<?
						}
					?>
       			 </select>
      			</td>
    		</tr>
            
        	<tr>
				<td>&nbsp;  </td>
				<td> <input type="submit" value=" Sửa " name="Submit" /> <input type="button" value=" Quay lại " onClick="location='?go=hotrotructuyen&action=view&page=1' ;"/></td>
			</tr>
		</table>
		
</form>
        <?
	}
	echo "</div>";

		?>
<div class="clear"></div>
</div>